package com.mineplatform.mapper;

import java.util.ArrayList;
import java.util.List;

import com.mineplatform.domain.M_Mine;
import com.mineplatform.domain.M_Reply;
import com.mineplatform.domain.MineReplyShow;
import com.mineplatform.dto.rep.MinesItemRep;

public class MinesItemRepMapper {

	public static List<MinesItemRep> parse(List<M_Mine> mines) {

		List<MinesItemRep> list = new ArrayList<MinesItemRep>();

		for (M_Mine mine : mines) {

			MinesItemRep rep = new MinesItemRep();

			rep.setMineid(mine.getId());
			rep.setCategoryid(mine.getMineCategoryId());
			rep.setCity(mine.getMineCity());
			rep.setCooperationintention(mine.getMineCooperationIntention());
			rep.setDegree(mine.getMineDegree());
			rep.setDescr(mine.getMineSubTitle());
			rep.setHot(mine.getMineHot());
			rep.setImgpath(mine.getMineImgPath());
			rep.setMaintype(mine.getMineMainType());
			rep.setMineraltype(mine.getMineMineralType());
			rep.setMiningmethod(mine.getMineMiningMethod());
			rep.setMiningright(mine.getMineMiningRight());
			rep.setMiningrightproperty(mine.getMineMiningRightProperty());

			rep.setName(mine.getMineName());
			rep.setTitle(mine.getMineTitle());

			rep.setOrder(mine.getMineSort());
			rep.setPosition(mine.getMinePosition());
			rep.setScale(mine.getMineScale());
			rep.setSquare(mine.getMineSquare());
			rep.setPubtime(mine.getMineCreateTime());
			rep.setProvinceid(mine.getProvinceId());

			rep.setPraisecount(mine.getPraiseCount());
			rep.setReplycount(mine.getReplyCount());
			
			rep.setPrice(mine.getMinePrice());
			rep.setCompany(mine.getCompanyName());

			rep.setMineimages(mine.getMineImages());
			// rep.setReplyid(reply.getId());
			// rep.setUserid(reply.getUserId());
			// rep.setPubtime(reply.getReplyReportTime());
			// rep.setContent(reply.getReplyText());
			
			rep.setCardno(mine.getCardNo());
			rep.setMineowner(mine.getMineOwner());
			rep.setMineralspecies(mine.getMineralSpecies());
			rep.setExpirydates(mine.getExpiryDates());
			rep.setGenetictype(mine.getGeneticType());

			list.add(rep);

		}

		return list;
	}
}
